package com.polaris.live.im.sfs.processor.impl

import com.polaris.live.im.sfs.COMMAND_STATE_USER_CHANGE
import com.polaris.live.im.sfs.core.bean.DataArgument
import com.polaris.live.im.sfs.processor.AbstractMessageProcessor
import com.polaris.live.common.constant.BizEventConst
import com.polaris.live.common.event.EventMessage
import org.greenrobot.eventbus.EventBus

/**
 * UserInfoChangeMessageProcessor
 *
 * @author Created by 半仙 on 2023/11/8/008 18:13
 */
class UserInfoChangeMessageProcessor : AbstractMessageProcessor() {

    override fun shouldProcess(type: Int, command: String): Boolean {
        return command == COMMAND_STATE_USER_CHANGE
    }

    override suspend fun handle(type: Int, command: String, argument: DataArgument) {
        EventBus.getDefault().post(EventMessage(BizEventConst.INFO_UPDATA))
    }
}